import request from "../api/index"
// 搜索主页面的数据
export const getHomelist = () => request.get("index/index")
// 搜索弹出的数据
export const getPopub = () => request.get("search/index")
// 删除历史记录
export const postDelete = () => request.post("search/clearhistory")
// 实时搜索数据
export const getHelper = (params) => request.get("search/helper", { params })
// 产品数据
export const getProduct = (params) => request.get("goods/list", { params })
// 登录（没有账号自动注册）
export const postLogin = params => request.post("auth/loginByWeb", params)
//  商品详情数据
export const getProducts = (params) => request.get("goods/detail", { params })
// 页面数据请求
export const getToPic = (params) => request.get("goods/related", { params })
// 购物车数量
export const getCart = (params) => request.get("cart/goodscount", { params })
//  加入购物车
export const postAddCart = params => request.post("cart/add", params)
//  获取购物车的数据
export const getCarts = (params) => request.get("cart/index", { params })
//  点击切换商品选中状态（含全选）
export const postcheck = params => request.post("cart/checked", params)
//  步进器
export const postStepperDate = params => request.post("cart/update", params)
// 删除商品
export const postDeletePru = params => request.post("cart/delete", params)
//  专题
export const getPage = (params) => request.get("topic/list", { params })
//  分类
export const getCatalog = (params) => request.get("catalog/index", { params })
//  获取当前分类
export const getcurCatalog = (params) => request.get("catalog/current", { params })